Skip to content

Conversation

@RachelMurray-Watson
Copy link
Collaborator

A proposed fix for Issue 1748 (#1748), specifically for how the rescheduling of appointments works with weather disruptions.

In this, for HSI_CardioMetabolicDisorders_Refill_Medication, if did_not_run_weather_event or never_ran_weather_event are called, there is a certain probability the individual will restart treatment. If so, the HSI HSI_CardioMetabolicDisorders_StartWeightLossAndMedication is scheduled.

Also fixed error that allows multiple CardioMetabolicDisordersWeightLossEvent to be scheduled (as no check was on to see if individuals were ever on weight loss treatment).

…_Refill_Medication, there is a redone did_not_run function and new never_ran function. These share logic in that, if an appointment to refill medication does not go ahead due to climate,the person will come off of medication but restart it with a certain probability. If the appointment goes ahead, it is rescheduled with a delay that is set by a climate-delay parameter used in the healthcare system.

Also added a check to ensure that the weightloss appointment cannot be scheduled if the person is already on weightloss treatment.
(Concern - is there a more current check to see if someone is currently on weightloss treatment?)

Also included changes in the healthcare system that are in the PR #1604 for illustration of how it would work. So far, only HSI_CardioMetabolicDisorders_Refill_Medication has the weather-related did_not_run and never_ran.

def did_not_run(self):
# If this HSI event did not run, then the persons ceases to be taking medication
def did_not_run_weather_event(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's worth renaming - this would either require, in the HealthSystem, you checking whether it is the appropriate CMD before calling did_not_run_weather_event, or ensuring that the did_not_run fnc in every HSI in the model is renamed did_not_run_weather_event

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also applies to never ran

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed: there is logic in the call_and_record_weather events that checks for CMD-related HSIs. Clunky, but functional for the moment!

hsi_event=HSI_CardioMetabolicDisorders_StartWeightLossAndMedication,
topen=self.sim.date + pd.DateOffset(days=1),
tclose=self.sim.date + pd.DateOffset(
days=self.sim.modules["HealthSystem"].parameters["scale_factor_delay_in_seeking_care_weather"] * 1),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This delay should inform topen, not tclose; it would also be best if it could directly reference a function computing the climate delay, rather than being hardcoded

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can keep the tclose - topen time gap as is usually coded when sheduling HSI_CardioMetabolicDisorders_StartWeightLossAndMedication

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments also apply to never_ran below

# number of days of climate disruption
priority=1
)
def never_ran_weather_event(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems very odd that did_not_run and never_ran are identical. But I guess this makes sense since in the CMD any delay in care is equivalent to a complete cancellation...

@@ -12,9 +12,11 @@

import numpy as np
import pandas as pd
from numpy import random
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow why there are so many changes to the healthsystem in this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed: out of date with master

…The tclose is 15 days after the new topen, in line with original reseeking healthcare logic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants